<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>window的使用</title>
		<script>
			function showWin()
			{
				alert("窗口在:"+window.screenX+","+window.screenY);
			}
			function goSohu()
			{
				window.location="http://www.sogou.com";
			}
			function closeWin()
			{
				if(confirm("您真的要关闭吗？"))
				{
					alert("准备关闭了");
					window.opener=null;
					window.close();
				}
			}
			function gotoTmall()
			{
				window.open("https://www.baidu.com","baidu","height=200px,width=300px,top=100px,left=100px");
			}
		</script>
	</head>
	<body>
		<input type="button" value="窗口在什么位置" onclick="showWin()"/>
		<input type="button" value="搜狐" onclick="goSohu()" />
		<input type="button" value="关闭" onclick="closeWin()" />
		<input type="button" value="打开baidu" onclick="gotoTmall()" />
		
		<ul>
			<li>
				<a href="js2.html" onclick="return confirm('真的删除?')">删除</a>
			</li>
		</ul>
	</body>
</html>
